package dataConstructions_finished;

import java.util.HashMap;

public class T217 {

    public boolean containsDuplicate(int[] nums) {

        HashMap<Integer, Integer> hashMap = new HashMap<>();
        for (int i = 0; i < nums.length; i++) {
            if (hashMap.getOrDefault(nums[i], 0) != 0) {
                return true;
            } else {
                hashMap.put(nums[i], 1);
            }
        }
        return true;
    }

}
